﻿@model IEnumerable<surg_sum_v2>
@if (ViewBag.Act == "search")
{
    foreach (var item in Model.Take(20))
    {
    <tr>
        <td>@item.ID
        </td>
        <td>@item.Title
        </td>
        <td>@item.Type
        </td>
        <td>
            <a href="#" onclick="var e=$('#ts_SrcSS').first();e.val(e.val()+'@(item.Title)'+';');return false;">
                添加&gt;&gt;</a>
        </td>
    </tr>    
    }
    var mc = Model.Count();
    if (mc > 20)
    { 
    <tr>
        <td colspan="4">
            共有@mc项，只显示前30项，请输入更多内容以精确定位...
        </td>
    </tr>
    }
}
else
{
    <div class="catalog-title">
        手术分类</div>
    using (Ajax.BeginForm(new AjaxOptions()
{
    LoadingElementId = "OnLoadingSpan",
    UpdateTargetId = "DataListView",
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "Post",
    OnFailure = "OnSiteError"
}))
    {
    <input type="hidden" name="act" value="search" />
    <label>
        搜索：</label> <input type="text" name="V1" /><input type="submit" name="submit" value="搜索" />
    }
    <div style="height: 400px; overflow: auto;">
        <table class="width">
            <tr>
                <th>
                    编号
                </th>
                <th>
                    名称
                </th>
                <th>
                    操作属性
                </th>
                <th>
                    操作
                </th>
            </tr>
            <tbody id="DataListView">
            </tbody>
        </table>
    </div>
}